namespace FastNetCore.Core.Response;

public class ResponseCode
{
    /// <summary>
    /// 成功默认代码
    /// </summary>
    public const int SUCCESS_CODE = 200;
    
    /// <summary>
    /// 失败默认代码
    /// </summary>
    public const int FAILURE_CODE = 500;


    public static string GetItemByCode(int code)
    {
        string msg = string.Empty;
        if (code == SUCCESS_CODE) msg = "请求成功";
        else if (code == FAILURE_CODE) msg = "请求失败";

        return msg;
    }
}